package cn.edu.siso.imhere;

import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import java.util.ArrayList;
import java.util.List;


public class GuideActivity extends BaseActivity {

    private ViewPager m_Page = null; // 滑动页对象

    private List<Fragment> m_Guides = null; // 欢迎图像列表
    private GuidePagerAdapter m_GuidePageAdapter = null; // 滑动页适配器

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);

        // 初始化导航界面数据
        m_Guides = new ArrayList<Fragment>();
        m_Guides.add(new GuideFirstFragment());
        m_Guides.add(new GuideSecondFragment());
        m_Guides.add(new GuideThirdFragment());

        m_Page = (ViewPager) findViewById(R.id.page);
        m_GuidePageAdapter = new GuidePagerAdapter(getSupportFragmentManager(), m_Guides);
        m_Page.setAdapter(m_GuidePageAdapter); // 为ViewPage关联一个适配器
    }
}
